package com.youlei.newgraduateproject.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;

/**
 * <p>
 * 
 * </p>
 *
 * @author youlei
 * @since 2021-05-26
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="SysOrderitem对象", description="")
public class SysOrderitem extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @TableId(value = "orderitem_id", type = IdType.AUTO)
    private Long orderitemId;

    @ApiModelProperty(value = "一个订单项中产品ID（外键）")
    private Long goodId;

    @ApiModelProperty(value = "一个订单项中产品名称")
    @TableField(exist = false)
    private String goodName;

    @ApiModelProperty(value = "产品数量")
    private Double goodQuantity;

    @ApiModelProperty(value = "一个订单项总金额")
    private BigDecimal totalPrice;

    @ApiModelProperty(value = "全部订单项总金额")
    @TableField(exist = false)
    private BigDecimal sumTotalPrice;

    private Integer deleted;


}
